using System;

namespace ExcelTemplateEngine.Configuration
{
    public interface ITemplateEngineConfiguration
    {
        /// <summary>
        /// 最大处理的行数
        /// </summary>
        int MaxRows { get; set; }
        
        /// <summary>
        /// 最大处理的列数
        /// </summary>
        int MaxColumns { get; set; }
        
        /// <summary>
        /// 是否启用调试模式
        /// </summary>
        bool DebugMode { get; set; }
        
        /// <summary>
        /// 临时文件目录
        /// </summary>
        string TempDirectory { get; set; }
        
        /// <summary>
        /// 默认填充模式
        /// </summary>
        FillMode DefaultFillMode { get; set; }
        
        /// <summary>
        /// 是否启用并发处理
        /// </summary>
        bool EnableConcurrency { get; set; }
        
        /// <summary>
        /// 最大并发线程数
        /// </summary>
        int MaxConcurrencyLevel { get; set; }
        
        /// <summary>
        /// 性能监控设置
        /// </summary>
        PerformanceSettings Performance { get; set; }
    }
    
    public enum FillMode
    {
        Insert,
        Overwrite,
        OverwriteWithFormat
    }
    
    public class PerformanceSettings
    {
        public bool EnablePerformanceMonitoring { get; set; } = false;
        public TimeSpan PerformanceWarningThreshold { get; set; } = TimeSpan.FromSeconds(5);
        public bool LogSlowOperations { get; set; } = true;
    }
}